//
//  MHVideoFrame2.h
//  MiHome
//
//  Created by Wayne Qiao on 2017/5/16.
//  Copyright © 2017年 小米移动软件. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <CoreVideo/CoreVideo.h>

@interface MHVideoFrame2 : NSObject

@property (nonatomic, strong) NSData* frameInfo; // bytes for TUTK FRAMEINFO_t

+ (instancetype)videoFrameWithAVFrame:(void *)frame;
+ (instancetype)videoFrameWithPixelBuffer:(CVPixelBufferRef)pixelBuffer;

- (void)setPixelBuffer:(CVPixelBufferRef)pixelBuffer;
- (CVPixelBufferRef)pixelBuffer;

+ (CVPixelBufferRef)pixelBufferFromAVFrame:(void *)avframe;

@end
